package lapsnake.model.stmt;

import lapsnake.model.*;
import lapsnake.model.data.*;
import lapsnake.model.data.OptionalChild;
import lapsnake.py.ast.ASTHelperFactory; import java.beans.PropertyVetoException;

import org.python.antlr.ast.*;

/**Wrapper class with helper functions for Raise nodes*/
public class LapRaise extends LapStatement {
	public final OptionalChild<LapExpression> type = new OptionalChild<>(this, LapExpression.class);
	public final OptionalChild<LapExpression> inst = new OptionalChild<>(this, LapExpression.class);
	public final OptionalChild<LapExpression> tback = new OptionalChild<>(this, LapExpression.class);
	
	public LapRaise(PyAST pyAST, ChildField<? super LapRaise> parent, Raise node) throws PropertyVetoException {
		super(pyAST, parent, node);
		
		ASTHelperFactory.makeHelper(pyAST, type, node.getInternalType());
		ASTHelperFactory.makeHelper(pyAST, inst, node.getInternalInst());
		ASTHelperFactory.makeHelper(pyAST, tback, node.getInternalTback());
		
		buildTextNodes(node);
	}
	
	
}
